def loop_case_1(A, B, C, D):
    for i in range(100):
        A[i] = A[i] + B[i]
        B[i + 1] = C[i] + D[i]
        i += 1
    return A, B


def loop_case_1a(A, B, C, D):
    A[0] = A[0] + B[0]
    for i in range(99):
        B[i + 1] = C[i] + D[i]
        A[i + 1] = A[i + 1] + B[i + 1]
        i += 1
    B[100] = C[99] + D[99]
    return A, B


def loop_case_2(A, B, C):
    for i in range(100):
        C[i] = 0
        for j in range(100):
            C[i] = A[i][j] * B[i]
            j += 1
        i += 1
    return C


def loop_case_2a(A, B, C):
    j = 99
    for i in range(100):
        C[i] = A[i][j] * B[i]
        i += 1
    return C
